import request from '@/utils/request'

export function listDevices(params) {
  return request({
    url: '/api/device/list-devices',
    method: 'get',
    params: params
  })
}

export function pageDevices(params) {
  return request({
    url: '/api/device/page-devices',
    method: 'get',
    params: params
  })
}

export function addDevice(data) {
  return request({
    url: '/api/device/add-device',
    method: 'post',
    data
  })
}

export function updateDevice(data) {
  return request({
    url: '/api/device/update-device',
    method: 'post',
    data
  })
}

export function deleteDevice(id) {
  return request({
    url: '/api/device/delete-device/' + id,
    method: 'delete'
  })
}
